//
//  ViewController.m
//  JCTool
//
//  Created by gome on 2018/5/11.
//  Copyright © 2018年 gome. All rights reserved.
//

#import "ViewController.h"
#import "NSString+Extension.h"
#import "NSMutableArray+Extension.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSString *format = [@"16602808396" jc_formatPhoneNumWithSymbol:@"-"];
    
    format = [@"16602808396" jc_encryptionPhoneNumWithSymbol:@"*"];
    NSLog(@"\n\n%@\n\n", format);
    
    
    NSMutableArray *arr = @[].mutableCopy;
    

    [arr jc_insertObjcet:@"12" atIndex:1];
    

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end



///****************************************************************************************/
///****************************************************************************************/
///****************************************************************************************/
///************                                                       *********************/
///************                                                       *********************/
///************                    开发者不直接面对的宏                   *********************/
///************                                                       *********************/
///************                                                       *********************/
///****************************************************************************************/
///****************************************************************************************/
///****************************************************************************************/
//
//
///*************************************************************************************************************/
////字体
////中文字体名称
//#define CHINESE_FONT_NAME                   @"Heiti SC"
//
//// 字体大小(常规/粗体)
//#define FONT(name, fontSize)                [UIFont fontWithName:(name) size:(fontSize)]
//#define BOLD_SYSTEM_FONT(fontSize)          [UIFont boldSystemFontOfSize:fontSize]
//
////系统字体大小
//#define SYSTEM_FONT(fontSize)               [UIFont systemFontOfSize:fontSize]
//
////中文字体大小
//#define CHINESE_SYSTEM_FONT(fontSize)       [UIFont fontWithName:CHINESE_FONT_NAME size:fontSize]
//
//
//
///**********************************************************************************************************/
////颜色
////带透明度颜色值 十进制
//#define COLOR_RGBA(r,g,b,a)                 [UIColor colorWithRed:r/255.0f \
//green:g/255.0f \
//vblue:b/255.0f alpha:a]
////颜色值 十进制
//#define COLOR_RGB(r,g,b)                    COLOR_RGBA(r,g,b,1.0f)
////十六进制颜色值
//#define HEX_COLOR(hex)                      [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 \
//green:((float)((hex & 0xFF00) >> 8)) / 255.0 \
//blue:((float)(hex & 0xFF)) / 255.0 alpha:1]
//
////白色
//#define COLOR_WHITLE_VALUE(value, a)        [UIColor colorWithRed:value/255.0 green:value/255.0 blue:value/255.0 alpha:a]
//
//
//#define UNICODE_TO_UTF16(x)                 (((((x - 0x10000) >>10) \
//| 0xD800) << 16)  \
//| (((x-0x10000)&3FF) \
//| 0xDC00))
//
//#define MULITTHREEBYTEUTF16TOUNICODE(x,y)   (((((x ^ 0xD800) << 2) \
//| ((y ^ 0xDC00) >> 8)) << 8) \
//| ((y ^ 0xDC00) & 0xFF)) + 0x10000
//
//#define COLOR_UNDER_LINE                    [UIColor colorWithRed:198/255.0 \
//green:198/255.0 \
//blue:198/255.0 alpha:1]
//
//
//
//
///************************************************************************************************************************/
//// App Frame Height&Width
//#define APP_FRAME_HEIGHT        [[UIScreen mainScreen] applicationFrame].size.height
//#define APP_FRAME_WIDTH         [[UIScreen mainScreen] applicationFrame].size.width
//
//// MainScreen Height&Width
//#define MAIN_SCREEN_HEIGHT      [[UIScreen mainScreen] bounds].size.height
//#define MAIN_SCREEN_WIDTH       [[UIScreen mainScreen] bounds].size.width
//
//// MainScreen bounds
//#define MAIN_SCREEN_BOUNDS      [[UIScreen mainScreen] bounds]
//
////不同屏幕尺寸字体适配（320，568是因为效果图为IPHONE5 如果不是则根据实际情况修改）比率（Ratio）
//#define K_SCREEN_WIDTH_RATIO    (MAIN_SCREEN_WIDTH / 320.0)
//#define K_SCREEN_HEIGHT_RATIO   (MAIN_SCREEN_HEIGHT / 568.0)
//
//
//
//
///************************************************************************************************************************/
////在Main线程上运行
//#define DISPATCH_ON_MAIN_THREAD(mainQueueBlock)                     dispatch_async(dispatch_get_main_queue(), mainQueueBlock)
//
////主线程上Demo
////DISPATCH_ON_MAIN_THREAD(^{
////更新UI
////})
//
//
//
////在Global Queue上运行
//#define DISPATCH_ON_GLOBAL_QUEUE_HIGH(globalQueueBlocl)             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), globalQueueBlocl)
//
//#define DISPATCH_ON_GLOBAL_QUEUE_DEFAULT(globalQueueBlocl)          dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), globalQueueBlocl)
//
//#define DISPATCH_ON_GLOBAL_QUEUE_LOW(globalQueueBlocl)              dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), globalQueueBlocl)
//
//#define DISPATCH_ON_GLOBAL_QUEUE_BACKGROUND(globalQueueBlocl)       dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), globalQueueBlocl)
//
////Global Queue
////DISPATCH_ON_GLOBAL_QUEUE_DEFAULT(^{
////异步耗时任务
////})
//
//
///************************************************************************************************************************/
//
//
///****************************************************************************************/
///****************************************************************************************/
///****************************************************************************************/
///************                                                       *********************/
///************                                                       *********************/
///************                      开发者直接面对的宏                  *********************/
///************                                                       *********************/
///************                                                       *********************/
///****************************************************************************************/
///****************************************************************************************/
///****************************************************************************************/
//
//
//
///*************************************字体************************************************/
////10-17号中文字体
//#define cFont17                 (CHINESE_SYSTEM_FONT(17))
//#define cFont16                 (CHINESE_SYSTEM_FONT(16))
//#define cFont15                 (CHINESE_SYSTEM_FONT(15))
//#define cFont14                 (CHINESE_SYSTEM_FONT(14))
//#define cFont13                 (CHINESE_SYSTEM_FONT(13))
//#define cFont12                 (CHINESE_SYSTEM_FONT(12))
//#define cFont11                 (CHINESE_SYSTEM_FONT(11))
//#define cFont10                 (CHINESE_SYSTEM_FONT(10))
//#define cFontSize(fontSize)     (CHINESE_SYSTEM_FONT(fontSize))
//
////10-17号系统字体
//#define sFont17                 (SYSTEM_FONT(17))
//#define sFont16                 (SYSTEM_FONT(16))
//#define sFont15                 (SYSTEM_FONT(15))
//#define sFont14                 (SYSTEM_FONT(14))
//#define sFont13                 (SYSTEM_FONT(13))
//#define sFont12                 (SYSTEM_FONT(12))
//#define sFont11                 (SYSTEM_FONT(11))
//#define sFont10                 (SYSTEM_FONT(10))
//#define sFontSize(fontSize)     (SYSTEM_FONT(fontSize))
//
//
//
///*************************************色彩************************************************/
////色彩
//#define ColorRGBA(r,g,b,a)      COLOR_RGBA(r,g,b,a)
//#define ColorRGB(r,g,b)         COLOR_RGB(r,g,b,1.0f)
//#define ColorHex(value)         HEX_COLOR(value)
//#define ColorWhitle(value)      COLOR_WHITLE_VALUE(value, 1.0f)
//
//#define Color0x333333           HEX_COLOR(0x333333)
//#define Color0x666666           HEX_COLOR(0x666666)
//#define Color0x999999           HEX_COLOR(0x999999)
//
//#define WhitleColor             ColorWhitle(255)
//
//
//
///*************************************view 适配 计算************************************************/
////适配比率
//#define AdaptedWidth(x)                 ceilf((x) * K_SCREEN_WIDTH_RATIO)
//#define AdaptedHeight(x)                ceilf((x) * K_SCREEN_HEIGHT_RATIO)
//
//#define AdaptedChineseFontSize(R)       CHINESE_SYSTEM_FONT(AdaptedWidth(R))
//#define AdaptedSystemFontSize(R)        SYSTEM_FONT(AdaptedWidth(R))
//
//
////获取View的属性
//#define GetViewWidth(view)              view.frame.size.width
//#define GetViewHeight(view)             view.frame.size.height
//#define GetViewX(view)                  view.frame.origin.x
//#define GetViewY(view)                  view.frame.origin.y
//
////导航栏高度
//#define NavgationBarHeight 64
//
////tabBar 高度
//#define TableBarHeight 49
//
//
//#define AppFrameHeight                  APP_FRAME_HEIGHT
//#define AppFrameWidth                   APP_FRAME_WIDTH
//
//// MainScreen Height&Width
//#define MainScreenHeight                MAIN_SCREEN_HEIGHT
//#define MainScreenWidth                 MAIN_SCREEN_WIDTH
//
//// MainScreen bounds
//#define MainScreenBounds                MAIN_SCREEN_BOUNDS
//
////不同屏幕尺寸字体适配（320，568是因为效果图为IPHONE5 如果不是则根据实际情况修改）比率（Ratio）
//#define ScreenWidthRatio                K_SCREEN_WIDTH_RATIO
//#define ScreenHeightRatio               K_SCREEN_HEIGHT_RATIO
//
//
///**********************************系统相关*******************************************************************/
//
////App版本号
//#define AppCurrentVersion               [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
//
//// 当前系统版本
//#define FloatSystemVersion              ([[[UIDevice currentDevice] systemVersion] floatValue])
//#define DoubleSystemVersion             ([[[UIDevice currentDevice] systemVersion] doubleValue])
//#define StringSystemVersion             ([[UIDevice currentDevice] systemVersion])
//
//// 是否大于等于IOS7
//#define IsIOS7                          (FloatSystemVersion >= 7.0)
//// 是否IOS6
//#define IsIOS6                          (FloatSystemVersion < 7.0)
//// 是否大于等于IOS8
//#define IsIOS8                          (FloatSystemVersion >=8.0)
//// 是否大于IOS9
//#define IsIOS9                          (FloatSystemVersion >=9.0)
//
//// 是否iPad
//#define IsPad                           (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
//
//
//
//
///************************************************************************************************************************/
////AppDelegate对象
//#define AppDelegateInstance             [[UIApplication sharedApplication] delegate]
//
////一些缩写
//#define KApplication                    [UIApplication sharedApplication]
//#define KKeyWindow                      [UIApplication sharedApplication].keyWindow
//#define KUserDefaults                   [NSUserDefaults standardUserDefaults]
//#define KNotificationCenter             [NSNotificationCenter defaultCenter]
//
////获取当前语言
//#define KCurrentLanguage                ([[NSLocale preferredLanguages] objectAtIndex:0])
//
////Library/Caches 文件路径
//#define FilePath                        ([[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil])
////获取temp
//#define kPathTemp                       NSTemporaryDirectory()
////获取沙盒 Document
//#define kPathDocument                   [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]
////获取沙盒 Cache
//#define kPathCache                      [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]
//
//
//
//
///*************************************数据转换*******************************************************/
//
////由角度转换弧度
//#define KDegreesToRadian(x)                     (M_PI * (x) / 180.0)
////由弧度转换角度
//#define KRadianToDegrees(radian)                (radian * 180.0) / (M_PI)
//
////获取一段时间间隔
//#define KStartTime CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
//#define KEndTime   NSLog(@"Time: %f", CFAbsoluteTimeGetCurrent() - start)
//
//
///**************************************引用***********************************************************/
//
////弱引用/强引用  可配对引用在外面用MPWeakSelf(self)，block用MPStrongSelf(self)  也可以单独引用在外面用MPWeakSelf(self) block里面用weakself
//#define YYWeakSelf(type)                                    __weak typeof(type) weak##type = type;
//#define YYStrongSelf(type)                                  __strong typeof(type) type = weak##type;
//
//
//
//
///*****************************************图片相关********************************************************/
//
////上传图片相关
//#define KImageCollectionCell_Width                          floorf((Main_Screen_Width - 10*2- 10*3)/3)
////最大的上传图片张数
//#define KupdateMaximumNumberOfImage                         12
////获取图片资源
//#define GetImage(imageName)                                 [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
//
//
///*****************************************多线程********************************************************/
//
////在Main线程上运行
//
//#define DispatchOnMainThread(mainQueueBlock)                DISPATCH_ON_MAIN_THREAD(mainQueueBlock)
//
////主线程上Demo
////DispatchOnMainThread(^{
////更新UI
////})
//
//
////在Global Queue上运行
//#define DispatchOnGlobalQueueHigh(globalQueueBlock)         DISPATCH_ON_GLOBAL_QUEUE_HIGH(globalQueueBlock)
//#define DispatchOnGlobalQueueDefault(globalQueueBlock)      DISPATCH_ON_GLOBAL_QUEUE_DEFAULT(globalQueueBlock)
//#define DispatchOnGlobalQueueLow(globalQueueBlock)          DISPATCH_ON_GLOBAL_QUEUE_LOW(globalQueueBlock)
//#define DispatchOnGlobalQueueBackground(globalQueueBlock)   DISPATCH_ON_GLOBAL_QUEUE_BACKGROUND(globalQueueBlock)
//
//
//
////Global Queue
////DispatchOnGlobalQueueDefault(^{
////异步耗时任务
////})


